package com.xbongbong.pro.applist.pojo;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author long.rao
 * @version v1.0
 * @date 2019/3/7 16:42
 * @since v1.0
 */
@Getter
@Setter
public class SelectOptionPojo {
    /**
     * <select>标签的<option>的 value
     */
    private List<Object> value;
    /**
     * 显示在<select>标签的<option>的名称
     */
    private String name;
    /**
     * 是否启用， 默认是启用
     */
    private Integer enable;
    /**
     * 数据类型  3:单选项，4：时间选择，16：员工/部门选择
     */
    private Integer fieldType;
    /**
     * 值是否多选 0:默认单选， 1：多选
     */
    private Integer isMultiple;
    /**
     * 子选项（二级菜单）列表
     */
    private ArrayList<SelectOptionPojo> childList;
    /**
     * <option>对应的attr
     */
    private String attr;
    /**
     * 标记
     */
    private String symbol;

    public SelectOptionPojo(List<Object> value, String name,String attr) {
        this.value = value;
        this.name = name;
        this.attr = attr;
    }

    public SelectOptionPojo(List<Object> value, String name, ArrayList<SelectOptionPojo> childList, String attr) {
        this.value = value;
        this.name = name;
        this.childList = childList;
        this.attr = attr;
    }



    public SelectOptionPojo(List<Object> value, String name, Integer enable, ArrayList<SelectOptionPojo> childList) {
        this.value = value;
        this.name = name;
        this.enable = enable;
        this.childList = childList;
    }

    public SelectOptionPojo(List<Object> value, String name, Integer enable,
                            Integer fieldType, ArrayList<SelectOptionPojo> childList) {
        this.value = value;
        this.name = name;
        this.enable = enable;
        this.fieldType = fieldType;
        this.childList = childList;
    }

    public SelectOptionPojo(List<Object> value, String name, Integer enable,
                            Integer fieldType, Integer isMultiple,
                            String attr, ArrayList<SelectOptionPojo> childList, String symbol) {
        this.value = value;
        this.name = name;
        this.enable = enable;
        this.fieldType = fieldType;
        this.isMultiple = isMultiple;
        this.attr = attr;
        this.childList = childList;
        this.symbol = symbol;
    }
}
